from django.conf.urls.defaults import *
from wal import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^wal/', include('wal.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # (r'^admin/', include('django.contrib.admin.urls')),
    (r'^wal/pedidos/', include('wal.pedidos.urls')),
    (r'^wal/control/', include('wal.control.urls')),
    (r'^wal/expedicion/', include('wal.expedicion.urls')),
    (r'^wal/articulos/', include('wal.articulos.urls')),
    (r'^wal/clientes/', include('wal.clientes.urls')),
    (r'^wal/familias/', include('wal.familias.urls')),
    (r'^wal/subfamilias/', include('wal.subfamilias.urls')),
    (r'^wal/estadisticas/', include('wal.estadisticas.urls')),
    (r'^wal/equipos/', include('wal.equipos.urls')),
#    (r'^wal/herramientas/', include('wal.herramientas.urls')),
    (r'^wal/insumos/', include('wal.insumos.urls')),
    (r'^$', 'wal.views.index'),
 #   (r'^wal/gal', 'wal.views.indexGalvanizado'),
    (r'^wal/dep', 'wal.views.indexDeposito'),
    (r'^admin/jsi18n/$', 'django.views.i18n.javascript_catalog'),
    #(r'^wal/admin/jsi18n', 'django.views.i18n.javascript_catalog'),

    (r'^admin/', include(admin.site.urls)),
)

if settings.DEBUG and settings.STATIC_ROOT:
    urlpatterns += patterns('',
     (r'%s(?P<path>.*)$' % settings.STATIC_URL.lstrip('/'),'django.views.static.serve',
        {'document_root': settings.STATIC_ROOT}),
     (r'^profiles/(?P<path>.*)$','django.views.static.serve',
        {'document_root':settings.MEDIA_ROOT,'show_indexes':True}),
    )